int sumDigit(int n)
{/*
    int result=0;
    while(n>0)
    {
        result+=n%10;
        n/=10;
    }
    return result;
    */
    return n<10?n:sumDigit(n/10)+(n%10);
}


int main()
{
    printf("%d\n",0==sumDigit(0));
    printf("%d\n",1==sumDigit(1));
    printf("%d\n",6==sumDigit(123));
    return 0;
}
